UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sy6Xwc7NmTh+AtdvM564DrKtI4JkbNFicNf58Iv0CD8='
WHERE
key_id = '141e80b031ea53b0fdb104776af949aef77f1a5ec727c62cfbb44d5a1588f99c'
AND (
token = 'sy6Xwc7NmTh+AtdvM564DrKtI4JkbNFicNf58Iv0CD8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)