UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QAmUpAET1V7tiFRn9lRxuTywwCNjZoWz/VnqYZ7xFqY='
WHERE
key_id = '0f3d10ba3ca24922ae893719092249bfbff2739568feb5d959f0be674500ab75'
AND (
token = 'QAmUpAET1V7tiFRn9lRxuTywwCNjZoWz/VnqYZ7xFqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)