UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p/1SLR/6VBcFZ8a63kbeFTsd9FyZBXTXeLHG2qg3LX8='
WHERE
key_id = 'b97af6bc455437c7ba0488b66b47b22690b445772ba7c485b1f5d6fdf282a619'
AND (
token = 'p/1SLR/6VBcFZ8a63kbeFTsd9FyZBXTXeLHG2qg3LX8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)