UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mvQvLV+EKHt5wB5QfKuCNUe6RNq/qIf01Y3mqfocp6o='
WHERE
key_id = 'a2a02ad82c3515eb32eba6ffb326868027fcdf53fdd00cf188d5aed9e1696795'
AND (
token = 'mvQvLV+EKHt5wB5QfKuCNUe6RNq/qIf01Y3mqfocp6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)