UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DIaXzwYZuQzr4yfExgcz1yh1RJv+dDvXcmNHSwb0jJQ='
WHERE
key_id = '625f39fc77b5c94b3949600b88c3b846125a2d3e254cf3e239b5dcbdb8b06242'
AND (
token = 'DIaXzwYZuQzr4yfExgcz1yh1RJv+dDvXcmNHSwb0jJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)