UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uRzPp+Jdu2c5ZSamwvPjfZgKxi35cuSZlWiuPXNJcMA='
WHERE
key_id = '1757e482ef1178899d134b86f0d78cf3147e2f559b7c6390e11e6cb026234e04'
AND (
token = 'uRzPp+Jdu2c5ZSamwvPjfZgKxi35cuSZlWiuPXNJcMA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)