UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GWTCDpfMH2TpItMzDAIo+p6rx7QHz1sd7NCzltq3z9c='
WHERE
key_id = '7b0dc26614ed83738131fdf34488a68cacc60cf43acfc763c53a13465a929b6c'
AND (
token = 'GWTCDpfMH2TpItMzDAIo+p6rx7QHz1sd7NCzltq3z9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)