UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gbPvocsytUrbzAEqR/Z29A25Mmf61uePxWzWsetnakI='
WHERE
key_id = 'e0c39d71bbb312073da598b669789619726401cf87cbd44595041dd23c530408'
AND (
token = 'gbPvocsytUrbzAEqR/Z29A25Mmf61uePxWzWsetnakI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)