UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mYGGfxUWH3dh8zbA/iMwHxJ9Rtusxbd/k1IiymV3G/U='
WHERE
key_id = '62062caed925e64a2fc75c1e2a594a64ed7b9962f0d9b5250bb79ac8ff2a7e8b'
AND (
token = 'mYGGfxUWH3dh8zbA/iMwHxJ9Rtusxbd/k1IiymV3G/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)