UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RzK+LBRYNYvslZ7koMEHCRFtKHGVQD6tZla9OuHZG4o='
WHERE
key_id = '530128b1599a21cb2c76f28802c461aac991246060ed1fe464f0dea39b766364'
AND (
token = 'RzK+LBRYNYvslZ7koMEHCRFtKHGVQD6tZla9OuHZG4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)