UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FqvFxKmmJefB/lasqfOHjcG2Ptem2XGwr5ZLs85GLKU='
WHERE
key_id = 'fb5e55e5c80ed749b5864692975a74bc69c66173d479888a2a0ef0f4bf0663c3'
AND (
token = 'FqvFxKmmJefB/lasqfOHjcG2Ptem2XGwr5ZLs85GLKU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)