UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1MVxOQ5ibxuYvmaT2m/ugbT73JPf5kQneM6Ku0HLryM='
WHERE
key_id = 'e75f5dae44af266a7ce7448a4f6a5e500705dfb9a751fa0262d905ac6aba0550'
AND (
token = '1MVxOQ5ibxuYvmaT2m/ugbT73JPf5kQneM6Ku0HLryM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)